package cn.com.mayue.guava.reflect;

import cn.com.mayue.guava.Person;
import com.google.common.reflect.Invokable;
import org.junit.Test;

/**
 * Created by mayue
 * Invokable 测试
 */
public class InvokableTest {

    @Test
    public void testInvokable() throws NoSuchMethodException {
        Invokable invokable = Invokable.from(Person.class.getMethod("save", String.class, int.class));
        System.out.println(invokable.isPublic());
        System.out.println(invokable.getDeclaringClass());
        System.out.println(invokable.getParameters());
        System.out.println(invokable.getOwnerType());
        System.out.println(invokable.getExceptionTypes());
        System.out.println(invokable.getReturnType());
        System.out.println(invokable.getModifiers());
        System.out.println(invokable.getName());
        System.out.println(invokable.isOverridable());
        System.out.println(invokable.isVarArgs());
        System.out.println(invokable.isPublic());
        System.out.println(invokable.isAbstract());
        System.out.println(invokable.isAccessible());
        System.out.println(invokable.isStatic());
    }
}
